
#include "Base.h"
#include "AssetManager.h"
#include "Asset.h"
#include "Parsers/Xml/tinyxml2.h"
#include "Parsers/Xml/XMLHelper.h"
#include "StringUtils.h"
#include <iosfwd>
#include <string>
#include <map>

using namespace tinyxml2;

namespace CasaEngine
{

SINGLETON_IMPL(AssetManager)


void AssetManager::AddAsset(Asset *asset_)
{
#ifdef CASAENGINE_DEBUG
	std::map<std::string, Asset *>::const_iterator asset = m_Assets.find(asset_->GetName());
#endif

	CASAENGINE_ASSERT( (asset != m_Assets.end()) && (CStringBuilder("AssetManager::AddAsset(): asset '")(asset_->GetName())("' already exist")).c_str() );

	m_Assets.insert(std::make_pair(asset_->GetName(), asset_));
}

void AssetManager::Load(const XMLElement* /*node_*/)
{

}

void AssetManager::Load(std::ifstream& /*in*/)
{

}

//#ifdef EDITOR

void AssetManager::Write(const XMLElement* /*node_*/)
{

}

void AssetManager::Write(std::ostream& /*os*/) const
{

}

// #endif // EDITOR

} // namespace CasaEngine
